package com.qf.service.impl;

import com.qf.dao.EntryDao;
import com.qf.dao.impl.EntryDaoImpl;
import com.qf.domain.EBookEntry;
import com.qf.domain.PageBean;
import com.qf.service.PageBeanService;

import java.util.List;

/**
 * 2020/12/9 19:12
 *
 * @author：Lixubiao
 */
public class PageBeanServiceImpl implements PageBeanService {
    @Override
    public PageBean getPageBean(Integer pageSize, Integer pageNum) {
        EntryDao entryDao=new EntryDaoImpl();
        Long toltalCount= entryDao.selecttoltal();
        List<EBookEntry> data=entryDao.selectEntries(pageSize,pageNum);
        PageBean pageBean=new PageBean(pageSize, pageNum, toltalCount, data);
        return pageBean;
    }
}
